package edu.bu.cs511.p5;

/** 
 * The interface definition for opcodes.  All opcodes must conform to
 * this basic interface so it must be generic.  Consequently, it
 * contains only two methods, one to execute the opcode (which makes
 * this into the Command Design Pattern), and the other is a method
 * returning true or false depending on if the opcode is enabled or
 * not.<p/>
 *
 * No data structures are used, so there is no RI.
 */
public interface IOpcode {
    /**
     * An opcode must override this method.  It will be invoked by the
     * scheduler hierarchy whenever it is deemed that this opcode
     * should run.
     */
    public void execute();

    /**
     * An opcode must override this method to return if it is enabled
     * or not. <p/>
     *
     * @EFFECTS return true if the task is enabled, or false
     * otherwise.
     */
    public boolean isEnabled();
}
